package FileBianli;

import java.io.File;

/**
 * @Description
 * @Author:PrinceHan
 * @CreateTime:2021/10/23 08:17
 */
public class FIleDemo {
    public static void main(String[] args) {
        File file = new File("E:\\Java-IDEA");
        getFilesPath(file);
    }
    public static void getFilesPath(File srcfile) {
        File[] files = srcfile.listFiles();
        if(files != null) {
            for(File file: files) {
                if(file.isDirectory()) {
                    getFilesPath(file);
                }
                else {
                    System.out.println(file.getAbsolutePath());
                }
            }
        }
    }
}
